package com.youlai.boot.modules.app.controller;

import com.youlai.boot.modules.bfapp.model.vo.BfAppVO;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import com.youlai.boot.common.result.Result;
import com.youlai.boot.modules.app.model.HomeVO;
import com.youlai.boot.modules.app.service.AppService;
import lombok.RequiredArgsConstructor;
import io.swagger.v3.oas.annotations.tags.Tag;

@Tag(name = "APP接口")
@RestController
@RequestMapping("/api/v1/app")
@RequiredArgsConstructor
public class AppController {

    private final AppService appService;

    @GetMapping("/home")
    public Result<HomeVO> home() {
        HomeVO homeVO = appService.home();
        return Result.success(homeVO);
    }

    @GetMapping("/appVersion")
    public Result<BfAppVO> getVersion() {
        BfAppVO version = appService.getVersion();
        return Result.success(version);
    }
}